#wizard abilities file
from abilities.base import *
import random

class SiphonMana(SpellAbility):
    def __init__(self,player):
        Ability.__init__(self,player)
        self.Name = "siphon mana"
    def calculateDamage(self,otherPlayer):
        self.HP += (self.Mana * 0.03)
        if self.HP > self.MaxHP:
            self.HP = self.MaxHP
        self.Mana -= (self.MaxMana * 0.03)
        return 0
    def setCooldown(self):
        self.Cooldown=0

class ConjureMana(SpellAbility):
    def __init__(self,player):
        Ability.__init__(self,player)
        self.Name = "conjure mana"
        def calculateDamage(self,otherPlayer):
            self.Mana += (self.MaxMana * 0.1)
            if self.Mana > self.MaxMana:
                self.Mana = self.MaxMana
            return 0
        def setCooldown(self):
            self.Cooldown=0

#--------FIRE---------	
class Fireball(Recast):
	def __init__(self,player):
		Ability.__init__(self,player)
		self.Name = "fireball"
		self.ReCastCounter = 1
		self.ReCast = 10
		self.Dmg = (random.uniform(((self.Player.Int * 2) / 3) ,(((self.Player.Int * 2) * 0.80) * 0.65)) + (self.Player.Int / 2))
	def setCooldown(self):
		self.Cooldown=0

class Impact(SpellAbility):
	def __init__(self,player):
		Ability.__init__(self,player)
		self.Name = "impact"
		#self.ReCastCounter = 1
		#self.ReCast = 50
		self.Dmg = (random.randint(20,25) + self.Player.Int)
	def setCooldown(self):
		self.Cooldown=3
	def addStun(self,otherPlayer):
		self.StunChance = 30
		if self.StunChance >= random.randint(1,100):
			otherPlayer.stun(1)
						
class FlameVortex(SpellAbility):
    def __init__(self,player):
        Ability.__init__(self,player)
        self.Name = "flame vortex"
    def calculateDamage(self,otherPlayer):
        self.Dmg
    def setCooldown(self):
        self.Cooldown=3
    def isAOE(self):
        return True
		
class LivingEmber(DoT):
    def __init__(self,player):
        DoT.__init__(self,player)
        self.Name = "living ember"
    def calculateDamage(self,otherPlayer):
        self.Dmg = (random.randint(10,15) + ((self.Player.Int * 4) / 5))
    def setCooldown(self):
        self.Cooldown=0
    def statChange(self,otherPlayer):
        return
    def removeStatChange(self,otherPlayer):
        return
    def upfrontDamage(self,otherPlayer):
        return 0
    def setTime(self):
        return 4
		
class Burning(DoT):
    def __init__(self,player):
        DoT.__init__(self,player)
        self.Name = "living ember"
    def calculateDamage(self,otherPlayer):
        self.Dmg = (self.Dmg * 0.3)
    def setCooldown(self):
        self.Cooldown=0
    def statChange(self,otherPlayer):
        return
    def removeStatChange(self,otherPlayer):
        return
    def upfrontDamage(self,otherPlayer):
        return 0
    def setTime(self):
        return 3


#---------FROST---------

class IceSpike(SpellAbility):
    def __init__(self,player):
        Ability.__init__(self,player)
        self.Name = "ice spike"
    def calculateDamage(self,otherPlayer):
        #Fill me in!
        raise NotImplementedError()
    def setCooldown(self):
        self.Cooldown=0